{template '_header'}



<div class="page-header">
    当前位置：<span class="text-primary">公告管理</span>
</div>

<div class="page-content">
    <form action="./index.php" method="get" class="form-horizontal form-search" role="form">
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="mx_shop" />
        <input type="hidden" name="do" value="web" />
        <input type="hidden" name="r"  value="system.copyright.notice" />
        <div class="page-toolbar">

             <span class=''>
                {ifp 'shop.adv.add'}
                <a class='btn btn-primary btn-sm' href="{php echo webUrl('system/copyright/notice/add')}"><i class='fa fa-plus'></i> 添加公告</a>
                {/if}
            </span>
            <div class="col-sm-6 pull-right">
                <div class="input-group">
                    <span class="input-group-select">
                        <select name="enabled" class='form-control'>
                            <option value="" {if $_GPC['status'] == ''} selected{/if}>状态</option>
                            <option value="1" {if $_GPC['status']== '1'} selected{/if}>显示</option>
                            <option value="0" {if $_GPC['status'] == '0'} selected{/if}>隐藏</option>
                        </select>
                    </span>
                    <input type="text" class=" form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="请输入关键词"> <span class="input-group-btn">

                    <button class="btn btn-primary" type="submit"> 搜索</button> </span>
                </div>

            </div>
        </div>
    </form>

    <form action="" method="post">
        {if count($list)>0}
        <div class="page-table-header">
            <input type='checkbox' />
            <div class="btn-group">
                {ifp 'system.copyright.notice.edit'}
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch' data-href="{php echo webUrl('system/copyright/notice/status',array('status'=>1))}">
                    <i class="icow icow-xianshi"></i> 显示</button>
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch'  data-href="{php echo webUrl('system/copyright/notice/status',array('status'=>0))}">
                    <i class="icow icow-yincang"></i> 隐藏</button>
                {/if}
                {ifp 'system.copyright.notice.delete'}
                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('system/copyright/notice/delete')}">
                    <i class='icow icow-shanchu1'></i> 删除</button>
                {/if}
            </div>
        </div>
        <table class="table table-responsive table-hover" >
            <thead class="navbar-inner">
            <tr>
                <th style="width:25px;"></th>
                <th style='width:50px'>顺序</th>
                <th>标题</th>
                <th>发布者</th>
                <th style='width:60px'>显示</th>
                <th style="width: 65px;">操作</th>
            </tr>
            </thead>
            <tbody>
            {loop $list $row}
            <tr>

                <td>
                    <input type='checkbox'   value="{$row['id']}"/>
                </td>
                <td>
                    {ifp 'system.copyright.notice.edit'}
                    <a href='javascript:;' data-toggle='ajaxEdit' data-href="{php echo webUrl('system/copyright/notice/displayorder',array('id'=>$row['id']))}" >{$row['displayorder']}</a>
                    {else}
                    {$row['displayorder']}
                    {/if}
                </td>

                <td>{$row['title']}</td>
                <td>{$row['author']}</td>
                <td>

                    <span class='label {if $row['status']==1}label-primary{else}label-default{/if}'
                    {ifp 'system.copyright.notice.edit'}
                    data-toggle='ajaxSwitch'
                    data-switch-value='{$row['status']}'
                    data-switch-value0='0|隐藏|label label-default|{php echo webUrl('system/copyright/notice/status',array('status'=>1,'id'=>$row['id']))}'
                    data-switch-value1='1|显示|label label-primary|{php echo webUrl('system/copyright/notice/status',array('status'=>0,'id'=>$row['id']))}'
                    {/if}
                    >
                    {if $row['status']==1}显示{else}隐藏{/if}</span>


                </td>
                <td style="text-align:left;">
                    {ifp 'system.copyright.notice.view|system.copyright.notice.edit'}
                    <a href="{php echo webUrl('system/copyright/notice/edit', array('id' => $row['id']))}" class="btn btn-op btn-operation">
                        <span data-toggle="tooltip" data-placement="top" data-original-title="{ifp 'system.copyright.notice.edit'}修改{else}查看{/if}">
                            <i class='icow icow-bianji2'></i>
                        </span>
                    </a>
                    {/if}
                    {ifp 'system.copyright.notice.delete'}
                    <a data-toggle='ajaxRemove' href="{php echo webUrl('system/copyright/notice/delete', array('id' => $row['id']))}"class="btn btn-op btn-operation" data-confirm='确认要删除此公告吗?'>
                        <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
                            <i class='icow icow-shanchu1'></i>
                        </span>
                    </a>
                    {/if}
                </td>
            </tr>
            {/loop}
            </tbody>
            <tfoot>
                <tr>
                    <td>
                        <input type="checkbox">
                    </td>
                    <td colspan="2">
                            <div class="btn-group">
                                {ifp 'system.copyright.notice.edit'}
                                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch' data-href="{php echo webUrl('system/copyright/notice/status',array('status'=>1))}">
                                    <i class="icow icow-xianshi"></i> 显示</button>
                                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch'  data-href="{php echo webUrl('system/copyright/notice/status',array('status'=>0))}">
                                    <i class="icow icow-yincang"></i> 隐藏</button>
                                {/if}
                                {ifp 'system.copyright.notice.delete'}
                                <button class="btn btn-default btn-sm btn-operation" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('system/copyright/notice/delete')}">
                                    <i class='icow icow-shanchu1'></i> 删除</button>
                                {/if}
                            </div>
                    </td>
                    <td colspan="3">
                        <div class='pagers' style='float:right;'>
                            {$pager}
                        </div>
                    </td>
                </tr>
            </tfoot>
        </table>
        {else}
        <div class='panel panel-default'>
            <div class='panel-body' style='text-align: center;padding:30px;'>
                暂时没有任何公告!
            </div>
        </div>
        {/if}

    </form>
</div>


{template '_footer'}